var express = require('express');
var router = express.Router();

var dataCtrl=require('../controller/news.controller');//获得控制器

/* GET users listing. */
// router.get('/', function(req, res, next) {
//   res.send('respond with a resource');
// });



//添加数据
router.post('/data', dataCtrl.create);
//查找数据
router.get('/data/:id', dataCtrl.get);
//修改数据
router.post('/data/:id', dataCtrl.update);
//删除数据
router.delete('/data/:id', dataCtrl.remove);
//列表显示
router.post('/list', dataCtrl.list);
//删除多个数据
router.post('/deletes', dataCtrl.deletes);

module.exports = router;
